using System;
using UnityEngine;
using Voodoo.Pattern;

public class SettingsButton : MonoBehaviour
{
	public GameObject SettingsScreen;

	private void Start()
	{
		MessageCenter instance = SingletonMB<MessageCenter>.Instance;
		instance.OnShopShow = (Action)Delegate.Combine(instance.OnShopShow, new Action(OnHideClick));
	}

	public void OnHideClick()
	{
		SettingsScreen.SetActive(value: false);
	}

	public void OnShowClick()
	{
		if (base.gameObject.activeSelf)
		{
			SettingsScreen.SetActive(value: true);
			SingletonMB<MessageCenter>.Instance.OnSettingsShow?.Invoke();
		}
	}
}
